
#include "cli.hpp"
#include "base.hpp"

#include <iostream>
#include <memory>

namespace fs = std::filesystem;

int start_program(int argc, const char *argv[]) {
    std::string current_dir_str = fs::current_path().string();
    if (current_dir_str.find("test_dir") == std::string::npos) {
        return -1; // 确保在test_dir运行数据
    }

    CommandExecutor executor;
    executor.set_cmmand(parse_command(argc, argv));
    auto result = executor.execute_command();
    show_error_message(result);

    return result.code;
}
